package com.qzsoft.zhjd.materiel.modules.materielapi.dto;

import java.util.List;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import lombok.Data;

/**
 * @ClassName MaterielItemBindDto
 * @Description 材料绑定、移除对象
 * @author linhuawei
 * @since 2022-01-20
 */
@Data
public class MaterielItemBindDto {

    @NotBlank(message = "磅房编号不可为空")
//    @Pattern(regexp = "^JD[0-9]{2}TS[0-9]{1}$", message = "磅房编号格式错误")
    private String siteNO;

    private List<String> bind;

    private List<String> unbind;

    public String getBasecode() {
        return siteNO.substring(0, 4);
    }

}
